-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auton delay #74
Auton delay #74
Conversation
src/main/java/frc/robot/Robot.java
Outdated
@@ -21,13 +23,14 @@ | |||
public class Robot extends TimedRobot { | |||
// Singleton Instances | |||
private AutonSelector autonSelector = AutonSelector.getInstance(); | |||
private DelaySelector delaySelector = DelaySelector.getInstance(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since delay selection is really part of auton selection, it doesn't need its own class, it can be build as a second item inside of auton selector
src/main/java/frc/robot/Robot.java
Outdated
// if (DriverStation.isFMSAttached()) { | ||
// vision.startRecording(); | ||
// } | ||
|
||
if (autonomousCommand != null) { | ||
driveTrain.setDrivingIdleMode(SwerveModuleConstants.kAutoDrivingMotorIdleMode); | ||
Timer.delay(autonomousDelay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still believe that adding a WaitCommand into the sequential command group inside of the Auton abstract class is a better implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought this way would be nicer because if someone wanted to make a new auton they wouldn't have to remeber to put a waitCommand at the top of the class especially if it was during a comp and it just slipped their minds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you put this in the auton class that all autons extend from then it won’t be an issue
} | ||
|
||
private DelaySelector() { | ||
this.delayChooser = Dashboard.getInstance().getDelayChooser(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of using a sendable chooser with a bunch of options, It would be a lot less code and a lot easier to make a selection if you just do Shuffleboard.getDouble() and then clamp it between 0 and 10.5.
That way you could do any fractional number of seconds between min and max and there isn't a long list of cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do i do that ive been trying to do it like a genearic entry but it is not allowing me to go from GenericEntry to Double
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want me to make a new tab
i found that link but i didnt think i should use it because i didnt know how to use it and put it on drivers tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can put it on the drivers tab. Let’s talk about this on Monday
@@ -3,7 +3,7 @@ | |||
import edu.wpi.first.wpilibj.PneumaticsModuleType; | |||
|
|||
public final class PneumaticsConstants { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be deleted along with compressor
@@ -20,7 +20,7 @@ public class Scoring extends PIDSubsystem { | |||
private final CANSparkMax rightScoringElevatorMotor = new CANSparkMax( | |||
ScoringConstants.rightScoringElevatorMotorPort, MotorType.kBrushless); | |||
private final CANSparkMax rollerMotor = new CANSparkMax( | |||
ScoringConstants.rollerMotorPort, MotorType.kBrushless); | |||
ScoringConstants.rollerMotorPort, MotorType.kBrushed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not commit any brushed motors. The chances of someone forgetting these and deploying to the comp bot and burning out neos is too high. Please set all instances of kBrushed back to Brushless before merging
e46f5ce
to
c1b09b9
Compare
Pull Request
Issue Number
Closes #73
Comments
i made a delay for auton so you can pick a number in the dashboard and it will wait that many seconds before auton